# -*- coding:utf-8 -*-

"""
众安
"""
from aw import *
from autotest import *


class Test_zhongan_05(TestCase):
    def setUp(self):
        print("Test_001 setUp")

    def test(self):
        Common.writeRule2file("Test_zhongan_05")
        Common.setRule("Test_zhongan_05")

        # FDS_QZ07005	1082	FDS_QZ07005众安风险近3月最大预估逾期天数过多	众安风险近3月最大预估逾期天数	众安风险近3月最大预估逾期天数>30	RD	福贷-授信决策点7	00
        ruleStr = "众安风险近6月最大预估逾期天数>30"
        Common.showRuleVariable(ruleStr)


        # 5 调用进件脚本
        Common.execFile(r'D:\dev\接口代码\AssetAutoTest\fudai\FDCreditChain.py')

        # 6 检查数据库结果
        expectVaule = {"result_code": "00", "rule_result": "RD", "rule_code": "FDS_QZ07005"}
        expectVaule = {"result_code": "00", "rule_result": "RD", "rule_code": "FDS_QZ07007"} # 众安风险近6月最大预估逾期天数>30
        Common.checkResult(expectVaule, times=5)


    def tearDown(self):
        print("Test_001 tearDown")
